<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>Hexo的使用介绍 | Jimmey-Jiang&#39;s Blog</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="自用笔记：本文属于自用笔记，不做详解，仅供参考。在此记录自己已理解并开始遵循的前端代码规范。What How Why　　最近，使用Hexo遇到了很多问题，在设立进行整理。">
<meta name="keywords" content="Hexo">
<meta property="og:type" content="article">
<meta property="og:title" content="Hexo的使用介绍">
<meta property="og:url" content="http://Jimmey-Jiang.github.io/2015/12/27/Hexo/Hexo/index.html">
<meta property="og:site_name" content="Jimmey-Jiang&#39;s Blog">
<meta property="og:description" content="自用笔记：本文属于自用笔记，不做详解，仅供参考。在此记录自己已理解并开始遵循的前端代码规范。What How Why　　最近，使用Hexo遇到了很多问题，在设立进行整理。">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2017-07-28T10:54:48.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Hexo的使用介绍">
<meta name="twitter:description" content="自用笔记：本文属于自用笔记，不做详解，仅供参考。在此记录自己已理解并开始遵循的前端代码规范。What How Why　　最近，使用Hexo遇到了很多问题，在设立进行整理。">
  
    <link rel="alternative" href="/atom.xml" title="Jimmey-Jiang&#39;s Blog" type="application/atom+xml">
  
  
    <link rel="icon" href="/img/favicon.png">
  
  
      <link rel="stylesheet" href="//cdn.bootcss.com/animate.css/3.5.0/animate.min.css">
  
  <link rel="stylesheet" href="/css/style.css">
  <link rel="stylesheet" href="/font-awesome/css/font-awesome.min.css">
  <link rel="apple-touch-icon" href="/apple-touch-icon.png">
  
  
      <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  
  <!-- 加载特效 -->
    <script src="/js/pace.js"></script>
    <link href="/css/pace/pace-theme-flash.css" rel="stylesheet" />
  <script>
      var yiliaConfig = {
          rootUrl: '/',
          fancybox: true,
          animate: true,
          isHome: false,
          isPost: true,
          isArchive: false,
          isTag: false,
          isCategory: false,
          open_in_new: false
      }
  </script>
</head>
<body>
  <div id="container">
    <div class="left-col">
    <div class="overlay"></div>
<div class="intrude-less">
    <header id="header" class="inner">
        <a href="/" class="profilepic">
            
            <img lazy-src="/img/head.jpg" class="js-avatar">
            
        </a>

        <hgroup>
          <h1 class="header-author"><a href="/" title="Hi Mate">安与生</a></h1>
        </hgroup>

        
        <p class="header-subtitle">城已成，兵不封，鼓不停，志不移，行不息</p>
        
        
            <form>
                <input type="text" class="st-default-search-input search" id="search" placeholder=" Search...">
            </form>
        
        
            <div id="switch-btn" class="switch-btn">
                <div class="icon">
                    <div class="icon-ctn">
                        <div class="icon-wrap icon-house" data-idx="0">
                            <div class="birdhouse"></div>
                            <div class="birdhouse_holes"></div>
                        </div>
                        <div class="icon-wrap icon-ribbon hide" data-idx="1">
                            <div class="ribbon"></div>
                        </div>
                        
                        <div class="icon-wrap icon-link hide" data-idx="2">
                            <div class="loopback_l"></div>
                            <div class="loopback_r"></div>
                        </div>
                        
                        
                        <div class="icon-wrap icon-me hide" data-idx="3">
                            <div class="user"></div>
                            <div class="shoulder"></div>
                        </div>
                        
                    </div>
                    
                </div>
                <div class="tips-box hide">
                    <div class="tips-arrow"></div>
                    <ul class="tips-inner">
                        <li>菜单</li>
                        <li>标签</li>
                        
                        <li>友情链接</li>
                        
                        
                        <li>关于我</li>
                        
                    </ul>
                </div>
            </div>
        

        <div id="switch-area" class="switch-area">
            <div class="switch-wrap">
                <section class="switch-part switch-part1">
                    <nav class="header-menu">
                        <ul>
                        
                            <li><a href="/archives">所有文章</a></li>
                        
                            <li><a href="/works">作品展示</a></li>
                        
                           <li><a href="/about">留言打卡</a></li>
                        
                            <li><a  target="_blank" href="https://tuchong.com/1496450/">摄影集展示</a></li>
                        
                        </ul>
                    </nav>
                    <nav class="header-nav">
                        <ul class="social">
                            
                                <a class="fl mail" target="_blank" href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=4trX0tXT19PV1aKTk8yBjY8" title="mail">mail</a>
                            
                                <a class="fl github" target="_blank" href="https://github.com/Jimmey-Jiang" title="github">github</a>
                            
                                <a class="fl zhihu" target="_blank" href="https://www.zhihu.com" title="zhihu">zhihu</a>
                            
                                <a class="fl weibo" target="_blank" href="http://weibo.com" title="weibo">weibo</a>
                            
                                <a class="fl google" target="_blank" href="http://i.youku.com" title="google">google</a>
                            
                                <a class="fl twitter" target="_blank" href="http://twitter.com" title="twitter">twitter</a>
                            
                                <a class="fl Instagram" target="_blank" href="https://www.instagram.com" title="Instagram">Instagram</a>
                            
                                <a class="fl linkedin" target="_blank" href="https://www.linkedin.com" title="linkedin">linkedin</a>
                            
                        </ul>
                    </nav>
                </section>
                
                
                <section class="switch-part switch-part2">
                    <div class="widget tagcloud" id="js-tagcloud">
                        <a href="/tags/Ajax/" style="font-size: 11.67px;">Ajax</a> <a href="/tags/CDN/" style="font-size: 10px;">CDN</a> <a href="/tags/CSS/" style="font-size: 18.33px;">CSS</a> <a href="/tags/CSS3/" style="font-size: 11.67px;">CSS3</a> <a href="/tags/Chrome/" style="font-size: 10px;">Chrome</a> <a href="/tags/Development/" style="font-size: 10px;">Development</a> <a href="/tags/Front-end-outline/" style="font-size: 10px;">Front end outline</a> <a href="/tags/FrontPlan/" style="font-size: 10px;">FrontPlan</a> <a href="/tags/Git/" style="font-size: 11.67px;">Git</a> <a href="/tags/Gulp/" style="font-size: 10px;">Gulp</a> <a href="/tags/HTML/" style="font-size: 13.33px;">HTML</a> <a href="/tags/Hack/" style="font-size: 10px;">Hack</a> <a href="/tags/Hexo/" style="font-size: 16.67px;">Hexo</a> <a href="/tags/Interview/" style="font-size: 10px;">Interview</a> <a href="/tags/JavaScript/" style="font-size: 13.33px;">JavaScript</a> <a href="/tags/Javascript/" style="font-size: 10px;">Javascript</a> <a href="/tags/Markdown/" style="font-size: 10px;">Markdown</a> <a href="/tags/Mobile/" style="font-size: 13.33px;">Mobile</a> <a href="/tags/NodeJs/" style="font-size: 10px;">NodeJs</a> <a href="/tags/OOCSS/" style="font-size: 10px;">OOCSS</a> <a href="/tags/React/" style="font-size: 10px;">React</a> <a href="/tags/ReactNative/" style="font-size: 20px;">ReactNative</a> <a href="/tags/Sass/" style="font-size: 10px;">Sass</a> <a href="/tags/Sublime/" style="font-size: 15px;">Sublime</a> <a href="/tags/Terminal/" style="font-size: 10px;">Terminal</a> <a href="/tags/Video/" style="font-size: 10px;">Video</a> <a href="/tags/Vue/" style="font-size: 15px;">Vue</a> <a href="/tags/WeChatSDK/" style="font-size: 10px;">WeChatSDK</a> <a href="/tags/rem/" style="font-size: 10px;">rem</a> <a href="/tags/window-7/" style="font-size: 10px;">window 7</a>
                    </div>
                </section>
                
                
                
                <section class="switch-part switch-part3">
                    <div id="js-friends">
                    
                      <a target="_blank" class="main-nav-link switch-friends-link" href="http://MOxFIVE.github.io/">MOxFIVE</a>
                    
                      <a target="_blank" class="main-nav-link switch-friends-link" href="http://www.vsay.cn/">DoubleV</a>
                    
                      <a target="_blank" class="main-nav-link switch-friends-link" href="http://www.ccwebsite.com/">兮兮</a>
                    
                      <a target="_blank" class="main-nav-link switch-friends-link" href="http://blog.dandyweng.com/">翁天信</a>
                    
                      <a target="_blank" class="main-nav-link switch-friends-link" href="http://www.plqblog.com/views/index.php">潘利强</a>
                    
                      <a target="_blank" class="main-nav-link switch-friends-link" href="http://www.hankin.cn/">hankin</a>
                    
                      <a target="_blank" class="main-nav-link switch-friends-link" href="http://blog.waydrow.com/">waydrow</a>
                    
                      <a target="_blank" class="main-nav-link switch-friends-link" href="https://www.tangbc.com">TANGBC</a>
                    
                      <a target="_blank" class="main-nav-link switch-friends-link" href="https://www.w3ctrain.com/">Helkyle</a>
                    
                    </div>
                </section>
                

                
                
                <section class="switch-part switch-part4">
                
                    <div id="js-aboutme">城已成，兵不封，鼓不停，志不移，行不息</div>
                </section>
                
            </div>
        </div>
    </header>                
</div>
    </div>
    <div class="mid-col">
      <nav id="mobile-nav">
      <div class="overlay">
          <div class="slider-trigger"></div>
          <h1 class="header-author js-mobile-header hide"><a href="/" title="Me">安与生</a></h1>
      </div>
    <div class="intrude-less">
        <header id="header" class="inner">
            <a href="/" class="profilepic">
                
                    <img lazy-src="/img/head.jpg" class="js-avatar">
                
            </a>
            <hgroup>
              <h1 class="header-author"><a href="/" title="Me">安与生</a></h1>
            </hgroup>
            
            <p class="header-subtitle">城已成，兵不封，鼓不停，志不移，行不息</p>
            
            <nav class="header-menu">
                <ul>
                
                    <li><a href="/archives">所有文章</a></li>
                
                    <li><a href="/works">作品展示</a></li>
                
                   <li><a href="/about">留言打卡</a></li>
                
                    <li><a  target="_blank" href="https://tuchong.com/1496450/">摄影集展示</a></li>
                
                <div class="clearfix"></div>
                </ul>
            </nav>
            <nav class="header-nav">
                <div class="social">
                    
                        <a class="mail" target="_blank" href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=4trX0tXT19PV1aKTk8yBjY8" title="mail">mail</a>
                    
                        <a class="github" target="_blank" href="https://github.com/Jimmey-Jiang" title="github">github</a>
                    
                        <a class="zhihu" target="_blank" href="https://www.zhihu.com" title="zhihu">zhihu</a>
                    
                        <a class="weibo" target="_blank" href="http://weibo.com" title="weibo">weibo</a>
                    
                        <a class="google" target="_blank" href="http://i.youku.com" title="google">google</a>
                    
                        <a class="twitter" target="_blank" href="http://twitter.com" title="twitter">twitter</a>
                    
                        <a class="Instagram" target="_blank" href="https://www.instagram.com" title="Instagram">Instagram</a>
                    
                        <a class="linkedin" target="_blank" href="https://www.linkedin.com" title="linkedin">linkedin</a>
                    
                </div>
            </nav>
        </header>                
    </div>
</nav>
      <div class="body-wrap"><article id="post-Hexo/Hexo" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/2015/12/27/Hexo/Hexo/" class="article-date">
      <time datetime="2015-12-27T10:29:00.000Z" itemprop="datePublished">2015-12-27</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      Hexo的使用介绍
    </h1>
  

      </header>
      
      <div class="article-info article-info-post">
        
    <div class="article-category tagcloud">
    <a class="article-category-link" href="/categories/Hexo/">Hexo</a>
    </div>

        
    <div class="article-tag tagcloud">
        <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Hexo/">Hexo</a></li></ul>
    </div>

        <div class="clearfix"></div>
      </div>
      
    
    <div class="article-entry" itemprop="articleBody">
      
          
        <p>　　<strong>自用笔记：</strong>本文属于自用笔记，不做详解，仅供参考。在此记录自己已理解并开始遵循的前端代码规范。What How Why<br>　　最近，使用Hexo遇到了很多问题，在设立进行整理。</p>
<a id="more"></a>
<h3 id="写文章"><a href="#写文章" class="headerlink" title="写文章"></a>写文章</h3><figure class="highlight yaml"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div></pre></td><td class="code"><pre><div class="line"><span class="string">$</span> <span class="string">hexo</span> <span class="string">n</span> <span class="comment">#写文章 </span></div><div class="line"></div><div class="line">    <span class="string">其中my</span> <span class="string">new</span> <span class="string">post为文章标题，执行命令后。</span></div><div class="line">    <span class="string">会在项目\source_posts中生成my</span> <span class="string">new</span> <span class="string">post.md文件，用编辑器打开编写即可。</span></div><div class="line"></div><div class="line">    <span class="string">当然，也可以直接在\source_posts中新建一个md文件，我就是这么做的。</span></div><div class="line"></div><div class="line">    <span class="string">文章开头语法：</span></div><div class="line"></div><div class="line"><span class="attr">title:</span> <span class="string">name</span> <span class="comment">#文章标题</span></div><div class="line"><span class="attr">date:</span> <span class="number">2015</span><span class="bullet">-12</span><span class="bullet">-25</span> <span class="number">18</span><span class="string">:29:00</span>  <span class="comment">#写作时间</span></div><div class="line"><span class="attr">description:</span> <span class="comment">#文章描述</span></div><div class="line"><span class="attr">categories:</span> <span class="comment">#文章分类</span></div><div class="line"><span class="bullet">-</span> <span class="string">建站</span></div><div class="line"><span class="attr">tags:</span> <span class="comment">#文章标签</span></div><div class="line"><span class="bullet">-</span> <span class="string">博客</span></div><div class="line"><span class="bullet">-</span> <span class="string">建站</span></div><div class="line"><span class="bullet">-</span> <span class="string">Hexo</span></div><div class="line"><span class="attr">toc:</span> <span class="literal">true</span> <span class="comment"># 生成目录</span></div><div class="line"><span class="attr">author:</span></div><div class="line"><span class="attr">comments:</span></div><div class="line"><span class="attr">original:</span></div><div class="line"><span class="attr">permalink:</span> <span class="comment">#指定链接</span></div><div class="line"><span class="meta">---</span></div><div class="line"></div><div class="line">    <span class="string">以上是摘要</span></div><div class="line"><span class="string">&lt;!--more--&gt;</span></div><div class="line"></div><div class="line">    <span class="string">以下是余下全文</span></div></pre></td></tr></table></figure>
<h3 id="写多种文章"><a href="#写多种文章" class="headerlink" title="写多种文章"></a>写多种文章</h3><figure class="highlight yaml"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div></pre></td><td class="code"><pre><div class="line"><span class="string">$</span> <span class="string">hexo</span> <span class="string">new</span> <span class="string">[layout]</span> <span class="string">"postName"</span> <span class="comment">#新建文章</span></div><div class="line"></div><div class="line">    <span class="string">[layout]：其中layout是可选参数，默认值为post。</span></div><div class="line">    <span class="string">有哪些layout呢，请到</span> <span class="string">scaffolds</span> <span class="string">目录下查看，这些文件名称就是layout名称。</span></div><div class="line">    <span class="string">当然你可以添加自己的layout，方法就是添加一个文件即可。</span></div><div class="line">    <span class="string">同时你也可以编辑现有的layout，比如post的layout默认是</span> <span class="string">hexo\scaffolds\post.md</span></div><div class="line"></div><div class="line">    <span class="string">关于hexo\scaffolds\photo.md配置文件的介绍：</span></div><div class="line"></div><div class="line"><span class="attr">layout:</span> <span class="string">&#123;</span> <span class="string">&#123;</span> <span class="string">layout</span> <span class="string">&#125;</span> <span class="string">&#125;</span> <span class="comment">#layout名称</span></div><div class="line"><span class="attr">title:</span> <span class="string">&#123;</span> <span class="string">&#123;</span> <span class="string">title</span> <span class="string">&#125;</span> <span class="string">&#125;</span> <span class="comment">#文章标题</span></div><div class="line"><span class="attr">date:</span> <span class="string">&#123;</span> <span class="string">&#123;</span> <span class="string">date</span> <span class="string">&#125;</span> <span class="string">&#125;</span> <span class="comment">#文章生成时间</span></div><div class="line"><span class="attr">ategories:</span> <span class="comment">#文章分类目录</span></div><div class="line"><span class="attr">tags:</span>  <span class="comment">#文章标签</span></div><div class="line"><span class="bullet">-</span>  <span class="comment">#</span></div><div class="line"><span class="attr">photos:</span>  <span class="comment">#</span></div><div class="line"><span class="bullet">-</span>  <span class="comment">#</span></div><div class="line"><span class="meta">---</span></div><div class="line"></div><div class="line"><span class="attr">layout:</span> <span class="string">photo</span></div><div class="line"><span class="attr">title:</span> <span class="string">我的阅历</span></div><div class="line"><span class="attr">date:</span> <span class="number">2085</span><span class="bullet">-01</span><span class="bullet">-16</span> <span class="number">07</span><span class="string">:33:44</span></div><div class="line"><span class="attr">tags:</span> <span class="string">[hexo]</span></div><div class="line"><span class="attr">photos:</span></div><div class="line"><span class="attr">- http:</span><span class="string">//bruce.u.qiniudn.com/2013/11/27/reading/photos-0.jpg</span></div><div class="line"><span class="attr">- http:</span><span class="string">//bruce.u.qiniudn.com/2013/11/27/reading/photos-1.jpg</span></div></pre></td></tr></table></figure>
<h3 id="自定义页面"><a href="#自定义页面" class="headerlink" title="自定义页面"></a>自定义页面</h3><figure class="highlight routeros"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div></pre></td><td class="code"><pre><div class="line">    执行new page命令</div><div class="line"></div><div class="line">$ hexo new<span class="built_in"> page </span><span class="string">"about"</span></div><div class="line"></div><div class="line">    在 *hexo\source\* 下会生成 <span class="number">*ab</span>out* 目录，</div><div class="line">    里面有个index.md，直接编辑就可以了，</div><div class="line">    然后在主题的 *_config.yml* 中将其配置显示出来。 </div><div class="line"></div><div class="line">    上述步骤，也可以手工生成，在 *hexo\source\* 下手工新建</div><div class="line">     <span class="number">*ab</span>out* 和 *index.md* 也是完全等价的。</div><div class="line"></div><div class="line">    因为markdown对table的支持不好，我是在about中直接</div><div class="line">    建立index.html，里面书写页面内容，hexo会帮你加上头和尾。</div></pre></td></tr></table></figure>
<h3 id="写页面（404）"><a href="#写页面（404）" class="headerlink" title="写页面（404）"></a>写页面（404）</h3><figure class="highlight routeros"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line">$ hexo new<span class="built_in"> page </span><span class="string">"404"</span></div><div class="line"></div><div class="line">UUhike@UUhike-pc MINGW64 /d/Hexo/Hexo (master)</div><div class="line">$ hexo new<span class="built_in"> page </span><span class="string">"404"</span></div><div class="line"><span class="builtin-name">INFO</span>  Created: D:\Hexo\Hexo\source\404\index-1.md</div></pre></td></tr></table></figure>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div><div class="line">43</div><div class="line">44</div><div class="line">45</div><div class="line">46</div><div class="line">47</div><div class="line">48</div><div class="line">49</div><div class="line">50</div><div class="line">51</div><div class="line">52</div><div class="line">53</div><div class="line">54</div><div class="line">55</div><div class="line">56</div><div class="line">57</div><div class="line">58</div><div class="line">59</div><div class="line">60</div><div class="line">61</div><div class="line">62</div><div class="line">63</div><div class="line">64</div><div class="line">65</div><div class="line">66</div><div class="line">67</div><div class="line">68</div><div class="line">69</div><div class="line">70</div><div class="line">71</div></pre></td><td class="code"><pre><div class="line">title: 404 Not Found：该页无法显示</div><div class="line">comments: false</div><div class="line">permalink: /404</div><div class="line">fancybox: false</div><div class="line">---</div><div class="line"><span class="tag">&lt;<span class="name">style</span> <span class="attr">type</span>=<span class="string">"text/css"</span>&gt;</span><span class="css"></span></div><div class="line">    <span class="selector-class">.article-title</span> &#123;</div><div class="line">        <span class="attribute">font-size</span>: <span class="number">2.1em</span>;</div><div class="line">    &#125;</div><div class="line">    <span class="selector-tag">strong</span> <span class="selector-tag">a</span> &#123;</div><div class="line">        <span class="attribute">color</span>: <span class="number">#747474</span>;</div><div class="line">    &#125;</div><div class="line">    <span class="selector-class">.share</span> &#123;</div><div class="line">        <span class="attribute">display</span>: none;</div><div class="line">    &#125;</div><div class="line">    <span class="selector-class">.player</span> &#123;</div><div class="line">        <span class="attribute">margin-left</span>: -<span class="number">10px</span>;</div><div class="line">    &#125;</div><div class="line">    <span class="selector-class">.sign</span> &#123;</div><div class="line">        <span class="attribute">text-align</span>: right;</div><div class="line">        <span class="attribute">font-style</span>: italic;</div><div class="line">    &#125;</div><div class="line">    <span class="selector-id">#page-visit</span> &#123;</div><div class="line">        <span class="attribute">display</span>: none;</div><div class="line">    &#125;</div><div class="line">    <span class="selector-class">.center</span> &#123;</div><div class="line">        <span class="attribute">text-align</span>: center;</div><div class="line">        <span class="attribute">height</span>: <span class="number">2.5em</span>;</div><div class="line">        <span class="attribute">font-weight</span>: bold;</div><div class="line">    &#125;</div><div class="line">    <span class="selector-class">.search2</span> &#123;</div><div class="line">        <span class="attribute">height</span>: <span class="number">2.2em</span>;</div><div class="line">        <span class="attribute">font-size</span>: <span class="number">1em</span>;</div><div class="line">        <span class="attribute">width</span>: <span class="number">50%</span>;</div><div class="line">        <span class="attribute">margin</span>: auto <span class="number">24%</span>;</div><div class="line">        <span class="attribute">color</span>: <span class="number">#727272</span>;</div><div class="line">        <span class="attribute">opacity</span>: .<span class="number">6</span>;</div><div class="line">        <span class="attribute">border</span>: <span class="number">2px</span> solid lightgray;</div><div class="line">    &#125;</div><div class="line">    <span class="selector-class">.search2</span><span class="selector-pseudo">:hover</span> &#123;</div><div class="line">        <span class="attribute">opacity</span>: <span class="number">1</span>;</div><div class="line">        <span class="attribute">box-shadow</span>: <span class="number">0</span> <span class="number">0</span> <span class="number">10px</span> <span class="built_in">rgba</span>(0, 0, 0, 0.3)</div><div class="line">        &#125;;</div><div class="line">    <span class="selector-class">.article-entry</span> <span class="selector-tag">hr</span> &#123;</div><div class="line">        <span class="attribute">margin</span>: <span class="number">0</span>;</div><div class="line">    &#125;</div><div class="line">    <span class="selector-class">.pic</span> &#123;</div><div class="line">        <span class="attribute">text-align</span>: center;</div><div class="line">        <span class="attribute">margin</span>: <span class="number">0</span>;</div><div class="line">    &#125;</div><div class="line">    <span class="selector-class">.pic</span> <span class="selector-tag">br</span> &#123;</div><div class="line">        <span class="attribute">display</span>: none;</div><div class="line">    &#125;</div><div class="line"><span class="tag">&lt;/<span class="name">style</span>&gt;</span></div><div class="line"></div><div class="line">***</div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"pic"</span>&gt;</span></div><div class="line"><span class="tag">&lt;<span class="name">img</span> <span class="attr">src</span>=<span class="string">"/resources/Mihawk-Wind.gif"</span> <span class="attr">title</span>=<span class="string">"Mihawk-Wind"</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">p</span> <span class="attr">class</span>=<span class="string">"center"</span>&gt;</span>很抱歉，您所访问的地址并不存在: <span class="tag">&lt;/<span class="name">p</span>&gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">p</span> <span class="attr">class</span>=<span class="string">"center"</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"/"</span>&gt;</span>回主页<span class="tag">&lt;/<span class="name">a</span>&gt;</span> · <span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"/archives"</span>&gt;</span>所有文章<span class="tag">&lt;/<span class="name">a</span>&gt;</span> · <span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"/about"</span>&gt;</span>留言板<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">p</span>&gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">p</span> <span class="attr">class</span>=<span class="string">"center"</span>&gt;</span>可在边栏搜索框中对本站进行检索，以获取相关信息。<span class="tag">&lt;/<span class="name">p</span>&gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">style</span>=<span class="string">"text-align: center"</span>&gt;</span></div><div class="line">以下是博主喜欢的一些歌曲，可以听听，稍作休息~</div><div class="line"><span class="tag">&lt;<span class="name">iframe</span> <span class="attr">frameborder</span>=<span class="string">"no"</span> <span class="attr">border</span>=<span class="string">"0"</span> <span class="attr">marginwidth</span>=<span class="string">"0"</span> <span class="attr">marginheight</span>=<span class="string">"0"</span> <span class="attr">width</span>=<span class="string">320</span> <span class="attr">height</span>=<span class="string">330</span> <span class="attr">src</span>=<span class="string">"http://music.163.com/outchain/player?type=0&amp;id=112513213&amp;auto=0&amp;height=430"</span>&gt;</span><span class="tag">&lt;/<span class="name">iframe</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></div></pre></td></tr></table></figure>
<h3 id="发布博客内容"><a href="#发布博客内容" class="headerlink" title="发布博客内容"></a>发布博客内容</h3><p>实现发布，前提是配置好，部署到Github前需要配置_config.yml文件。</p>
<figure class="highlight dts"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line"><span class="meta"># Deployment</span></div><div class="line"><span class="meta">## Docs: http:<span class="comment">//hexo.io/docs/deployment.html</span></span></div><div class="line"><span class="symbol">deploy:</span></div><div class="line"><span class="symbol">  type:</span> github</div><div class="line"><span class="symbol">  repository:</span> git@github.com:zhchnchn/zhchnchn.github.io.git</div><div class="line"><span class="symbol">  branch:</span> master</div></pre></td></tr></table></figure>
<p>更新的最新版本，可能会有Bug，自行百度，好像要修改type：git。<br><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div></pre></td><td class="code"><pre><div class="line"><span class="meta">$</span><span class="bash"> hexo server <span class="comment">#开启预览访问端口（默认端口4000，'ctrl + c'关闭server）Hexo 会监视文件变动并自动更新，您无须重启服务器。</span></span></div><div class="line"><span class="meta"></span></div><div class="line">$<span class="bash"> hexo g <span class="comment">#生成</span></span></div><div class="line"><span class="meta">$</span><span class="bash"> hexo generate <span class="comment">#生成静态页面至public目录（最终上传这个文件到GitHub）</span></span></div><div class="line"><span class="meta"></span></div><div class="line">$<span class="bash"> hexo d == hexo deploy<span class="comment">#部署</span></span></div><div class="line"><span class="meta">$</span><span class="bash"> hexo d <span class="comment">#部署 # 可与hexo g合并为 hexo d -g</span></span></div><div class="line"><span class="meta"></span></div><div class="line">$<span class="bash"> hexo deploy -g</span></div><div class="line"><span class="meta">$</span><span class="bash"> hexo server -g <span class="comment"># 生成默认文件群再执行,开启本地静态html服务器</span></span></div></pre></td></tr></table></figure></p>
<h3 id="主题的更改"><a href="#主题的更改" class="headerlink" title="主题的更改"></a>主题的更改</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div></pre></td><td class="code"><pre><div class="line">1. 将Git Shell 切到/D/Hexo目录下，然后执行下面的命令，将pacman下载到 themes/pacman 目录下。</div><div class="line"><span class="meta"></span></div><div class="line">$<span class="bash"> git <span class="built_in">clone</span> https://github.com/A-limon/pacman.git themes/pacman</span></div><div class="line">2. 修改你的博客根目录/D/Hexo下的config.yml配置文件中的theme属性，将其设置为pacman。</div><div class="line"></div><div class="line">3. 更新pacman主题</div><div class="line"><span class="meta"></span></div><div class="line">$<span class="bash"> <span class="built_in">cd</span> themes/pacman</span></div><div class="line"><span class="meta">$</span><span class="bash"> git pull</span></div><div class="line"></div><div class="line">NOTE：先备份_config.yml 文件后再升级</div><div class="line"></div><div class="line">主题：</div><div class="line">    yilia</div><div class="line"><span class="meta">$</span><span class="bash"> git <span class="built_in">clone</span> https://github.com/litten/hexo-theme-yilia.git themes/yilia</span></div><div class="line">    modernist</div><div class="line"><span class="meta">$</span><span class="bash"> git <span class="built_in">clone</span> https://github.com/heroicyang/hexo-theme-modernist.git themes/modernist</span></div><div class="line">    jacman</div><div class="line"><span class="meta">$</span><span class="bash"> git <span class="built_in">clone</span> https://github.com/cnfeat/cnfeat.git themes/jacman</span></div></pre></td></tr></table></figure>
<h3 id="文章图片路径"><a href="#文章图片路径" class="headerlink" title="文章图片路径"></a>文章图片路径</h3><p>Hexo如何方式图片，图片应该放置到哪里，不会应为上传而覆盖掉。然后把文章里的index.md删除，将文件存放在resource文件夹中间。</p>
<figure class="highlight routeros"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line">    发布页面</div><div class="line">$ hexo new<span class="built_in"> page </span><span class="string">"name"</span> # 新建一个页面，页面名称name</div><div class="line"></div><div class="line">    UUhike@UUhike-pc MINGW64 /d/Hexo/Hexo (master)</div><div class="line">$ hexo new<span class="built_in"> page </span><span class="string">"resoures"</span></div><div class="line">    <span class="builtin-name">INFO</span>  Created: D:\Hexo\Hexo\source\resoures\index.md</div></pre></td></tr></table></figure>
<h3 id="Hexo文件备份"><a href="#Hexo文件备份" class="headerlink" title="Hexo文件备份"></a>Hexo文件备份</h3><figure class="highlight sql"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div><div class="line">43</div><div class="line">44</div><div class="line">45</div><div class="line">46</div><div class="line">47</div><div class="line">48</div><div class="line">49</div><div class="line">50</div><div class="line">51</div><div class="line">52</div><div class="line">53</div><div class="line">54</div><div class="line">55</div><div class="line">56</div><div class="line">57</div><div class="line">58</div><div class="line">59</div><div class="line">60</div><div class="line">61</div><div class="line">62</div></pre></td><td class="code"><pre><div class="line">    git-backup.</div><div class="line"></div><div class="line">    <span class="keyword">Install</span></div><div class="line"></div><div class="line">    <span class="keyword">if</span> your hexo <span class="keyword">version</span> <span class="keyword">is</span> <span class="number">2.</span>x.x, you should <span class="keyword">install</span> <span class="keyword">as</span> follow:</div><div class="line"></div><div class="line">$ npm <span class="keyword">install</span> hexo-git-<span class="keyword">backup</span>@<span class="number">0.0</span><span class="number">.91</span> <span class="comment">--save</span></div><div class="line">    <span class="keyword">if</span> <span class="keyword">version</span> <span class="keyword">is</span> <span class="number">3.</span>x.x, you should <span class="keyword">install</span> <span class="keyword">as</span> follow:</div><div class="line"></div><div class="line">$ npm <span class="keyword">install</span> hexo-git-<span class="keyword">backup</span> <span class="comment">--save</span></div><div class="line">    <span class="keyword">Update</span></div><div class="line"></div><div class="line">    <span class="keyword">if</span> you <span class="keyword">install</span> <span class="keyword">with</span> <span class="comment">--save, you must remove firstly when you update it.</span></div><div class="line"></div><div class="line">$ npm remove hexo-git-<span class="keyword">backup</span></div><div class="line">$ npm <span class="keyword">install</span> hexo-git-<span class="keyword">backup</span> <span class="comment">--save</span></div><div class="line">    Configure</div><div class="line"></div><div class="line">    You should configure this <span class="keyword">plugin</span> <span class="keyword">in</span> _config.yml.</div><div class="line"></div><div class="line"><span class="keyword">backup</span>:</div><div class="line">    <span class="keyword">type</span>: git</div><div class="line">    repository:</div><div class="line">       github: git@github.com:xxx/xxx.git,branchName</div><div class="line">       gitcafe: git@github.com:xxx/xxx.git,branchName</div><div class="line"><span class="keyword">Using</span></div><div class="line"></div><div class="line">hexo <span class="keyword">backup</span> </div><div class="line"><span class="keyword">or</span></div><div class="line"></div><div class="line">hexo b</div><div class="line">Options</div><div class="line"></div><div class="line"><span class="keyword">if</span> you want <span class="keyword">to</span> back up <span class="keyword">with</span> your theme,just <span class="keyword">add</span> theme: your theme <span class="keyword">name</span>,your theme <span class="keyword">name</span> <span class="keyword">in</span> _config.yml.</div><div class="line"></div><div class="line"><span class="keyword">backup</span>:</div><div class="line">    <span class="keyword">type</span>: git</div><div class="line">    theme: coney,landscape,xxx</div><div class="line">    repository:</div><div class="line">       github: git@github.com:xxx/xxx.git,branchName</div><div class="line">       gitcafe: git@github.com:xxx/xxx.git,branchName</div><div class="line">Attention: <span class="keyword">if</span> you <span class="keyword">do</span> <span class="keyword">as</span> above, the dir themes/coney/.gitwill be removed</div><div class="line"></div><div class="line"><span class="keyword">if</span> you want DIY <span class="keyword">commit</span> message, just <span class="keyword">add</span> <span class="string">'message: update xxx'</span>.</div><div class="line"></div><div class="line"><span class="keyword">backup</span>:</div><div class="line">    <span class="keyword">type</span>: git</div><div class="line">    message: <span class="keyword">update</span> xxx</div><div class="line">    repository:</div><div class="line">       github: git@github.com:xxx/xxx.git,branchName</div><div class="line">       gitcafe: git@github.com:xxx/xxx.git,branchName</div><div class="line"><span class="keyword">Now</span> you can <span class="keyword">backup</span> all the blog!</div><div class="line"></div><div class="line">Problems</div><div class="line"></div><div class="line">You may <span class="keyword">get</span> <span class="keyword">some</span> troubles <span class="keyword">by</span> your computer<span class="string">' permission。</span></div><div class="line"></div><div class="line">Error: EISDIR, open</div><div class="line"></div><div class="line">it is caused by permission. just do 'sudo hexo b<span class="string">'</span></div><div class="line"></div><div class="line">sudo hexo b</div></pre></td></tr></table></figure>
<h2 id="本地浏览"><a href="#本地浏览" class="headerlink" title="本地浏览"></a>本地浏览</h2><p>hexo s<br>hexo s –draf 浏览全部文章同时可以浏览不同目录中的文件</p>
<h1 id="参考资料："><a href="#参考资料：" class="headerlink" title="参考资料："></a>参考资料：</h1><p><a href="http://Jimmey-Jiang.github.io/2015/12/25/GitHub+Hexo/">使用GitHub搭建Hexo博客</a><br><a href="http://Jimmey-Jiang.github.io/2015/12/27/Hexo-plug/">Hexo插件安装</a><br><a href="http://ibruce.info/2013/11/22/hexo-your-blog/" target="_blank" rel="external">hexo你的博客</a><br><a href="http://www.jianshu.com/p/05289a4bc8b2#" target="_blank" rel="external">如何搭建一个独立博客——简明Github Pages与Hexo教程</a></p>

      
      
        <div class="page-reward">
          <p><a href="javascript:void(0)" onclick="dashangToggle()" class="dashang">赏</a></p>
          <div class="hide_box"></div>
          <div class="shang_box">
            <a class="shang_close" href="javascript:void(0)" onclick="dashangToggle()">×</a>
            <div class="shang_tit">
              <p>纯属好玩</p>
            </div>
            <div class="shang_payimg">
              <img src="/img/alipayimg.jpg" alt="扫码支持" title="扫一扫" />
            </div>
              <div class="pay_explain">扫码打赏，你说多少就多少</div>
            <div class="shang_payselect">
              
                <div class="pay_item checked" data-id="alipay">
                  <span class="radiobox"></span>
                  <span class="pay_logo"><img src="/img/alipay.png" alt="支付宝" /></span>
                </div>
              
              
                <div class="pay_item" data-id="wechat">
                  <span class="radiobox"></span>
                  <span class="pay_logo"><img src="/img/weixin.png" alt="微信" /></span>
                </div>
              
            </div>
            <div class="shang_info">
              <p>打开<span id="shang_pay_txt">支付宝</span>扫一扫，即可进行扫码打赏哦</p>
            </div>
          </div>
        </div>
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.2.0/zepto.min.js"></script>
        <script type="text/javascript">
          $(".pay_item").click(function(){
            $(this).addClass('checked').siblings('.pay_item').removeClass('checked');
            var dataid=$(this).attr('data-id');
            $(".shang_payimg img").attr("src","/img/"+dataid+"img.jpg");
            $("#shang_pay_txt").text(dataid=="alipay"?"支付宝":"微信");
          });
          function dashangToggle(){
            window._hmt.push(['_trackEvent', 'pay', 'click', '赏'])
            $(".hide_box").fadeToggle();
            $(".shang_box").fadeToggle();
          }
        </script>
      
    </div>
    
  </div>
  
    
    <div class="copyright">
        <p><span>本文标题:</span><a href="/2015/12/27/Hexo/Hexo/">Hexo的使用介绍</a></p>
        <p><span>文章作者:</span><a href="/" title="访问 安与生 的个人博客">安与生</a></p>
        <p><span>发布时间:</span>2015年12月27日 - 18时29分</p>
        <p><span>最后更新:</span>2017年07月28日 - 18时54分</p>
        <p>
            <span>原始链接:</span><a class="post-url" href="/2015/12/27/Hexo/Hexo/" title="Hexo的使用介绍">http://Jimmey-Jiang.github.io/2015/12/27/Hexo/Hexo/</a>
            <span class="copy-path" data-clipboard-text="原文: http://Jimmey-Jiang.github.io/2015/12/27/Hexo/Hexo/　　作者: 安与生" title="点击复制文章链接"><i class="fa fa-clipboard"></i></span>
            <script src="/js/clipboard.min.js"></script>
            <script> var clipboard = new Clipboard('.copy-path'); </script>
        </p>
        <p>
            <span>许可协议:</span><i class="fa fa-creative-commons"></i> <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/cn/" title="中国大陆 (CC BY-NC-SA 3.0 CN)" target = "_blank">"署名-非商用-相同方式共享 3.0"</a> 转载请保留原文链接及作者。
        </p>
    </div>



<nav id="article-nav">
  
    <a href="/2015/12/27/Hexo/HexoPlug/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption"><</strong>
      <div class="article-nav-title">
        
          Hexo插件安装
        
      </div>
    </a>
  
  
    <a href="/2015/12/27/Hexo/HexoTheme/" id="article-nav-older" class="article-nav-link-wrap">
      <div class="article-nav-title">Hexo 主题：SPFK</div>
      <strong class="article-nav-caption">></strong>
    </a>
  
</nav>

  
</article>

    <div id="toc" class="toc-article">
    <strong class="toc-title">文章目录</strong>
    <ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#写文章"><span class="toc-number">1.</span> <span class="toc-text">写文章</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#写多种文章"><span class="toc-number">2.</span> <span class="toc-text">写多种文章</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#自定义页面"><span class="toc-number">3.</span> <span class="toc-text">自定义页面</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#写页面（404）"><span class="toc-number">4.</span> <span class="toc-text">写页面（404）</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#发布博客内容"><span class="toc-number">5.</span> <span class="toc-text">发布博客内容</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#主题的更改"><span class="toc-number">6.</span> <span class="toc-text">主题的更改</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#文章图片路径"><span class="toc-number">7.</span> <span class="toc-text">文章图片路径</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#Hexo文件备份"><span class="toc-number">8.</span> <span class="toc-text">Hexo文件备份</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#本地浏览"><span class="toc-number"></span> <span class="toc-text">本地浏览</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#参考资料："><span class="toc-number"></span> <span class="toc-text">参考资料：</span></a>
</div>
<input type="button" id="tocButton" value="隐藏目录"  title="点击按钮隐藏或者显示文章目录">

<script src="https://7.url.cn/edu/jslib/comb/require-2.1.6,jquery-1.9.1.min.js"></script>
<script>
    var valueHide = "隐藏目录";
    var valueShow = "显示目录";

    if ($(".left-col").is(":hidden")) {
        $("#tocButton").attr("value", valueShow);
    }
    $("#tocButton").click(function() {
        if ($("#toc").is(":hidden")) {
            $("#tocButton").attr("value", valueHide);
            $("#toc").slideDown(320);
        }
        else {
            $("#tocButton").attr("value", valueShow);
            $("#toc").slideUp(350);
        }
    })
    if ($(".toc").length < 1) {
        $("#toc, #tocButton").hide();
    }
</script>





<div class="bdsharebuttonbox">
	<a href="#" class="fx fa-weibo bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
	<a href="#" class="fx fa-weixin bds_weixin" data-cmd="weixin" title="分享到微信"></a>
	<a href="#" class="fx fa-qq bds_sqq" data-cmd="sqq" title="分享到QQ好友"></a>
	<a href="#" class="fx fa-facebook-official bds_fbook" data-cmd="fbook" title="分享到Facebook"></a>
	<a href="#" class="fx fa-twitter bds_twi" data-cmd="twi" title="分享到Twitter"></a>
	<a href="#" class="fx fa-linkedin bds_linkedin" data-cmd="linkedin" title="分享到linkedin"></a>
	<a href="#" class="fx fa-files-o bds_copy" data-cmd="copy" title="分享到复制网址"></a>
</div>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"2","bdSize":"24"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>




    
        <div id="gitments"></div>
<script src="/js/gitment.browser.js"></script>
<script>
    var gitment = new Gitment({
      id: window.location.pathname,
      owner: 'Jimmey-Jiang',
      repo: 'Jimmey-Jiang.github.io',
      oauth: {
        client_id: '7f50019c6a02c37e7aca',
        client_secret: 'd583910e6ae1492b375796d2c82efcda2cc67aae',
      },
    })
    gitment.render('gitments')
</script>
    



    <div class="scroll" id="post-nav-button">
        
            <a href="/2015/12/27/Hexo/HexoPlug/" title="上一篇: Hexo插件安装">
                <i class="fa fa-angle-left"></i>
            </a>
        
        <a title="文章列表"><i class="fa fa-bars"></i><i class="fa fa-times"></i></a>
        
            <a href="/2015/12/27/Hexo/HexoTheme/" title="下一篇: Hexo 主题：SPFK">
                <i class="fa fa-angle-right"></i>
            </a>
        
    </div>
    <ul class="post-list"><li class="post-list-item"><a class="post-list-link" href="/2017/08/29/Tool/GitWorkflows/">Git Workflows</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/08/19/Tool/Git/">Git速查手册</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/08/18/FrontFrame/Vue/VueComponents/">Vue组件探秘</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/08/18/Induce/InduceSass/">深入Sass</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/08/18/FrontFrame/Vue/KeepAlive/">keep-alive最佳实践</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/08/18/Induce/CSS/CssLowFrequency/">CSS低频属性</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/08/02/Tool/Terminal/">Terminal配置</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/07/25/Induce/Weixin/JS-SDK/">WeChat SDK</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/07/12/Induce/Hack/Canvas/">浏览器常见Bug——Canvas</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/04/25/FrontFrame/Vue/Vuex/">Vuex</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/03/25/Induce/HTML/Video/">Mobile Video</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/03/25/FrontFrame/Vue/VueRouter/">Vue Router</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/03/21/Tool/Sublime/sublimeMac/">Sublime Mac 快捷键</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/02/14/FrontFrame/React/React/">React初探</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/01/02/Induce/CSS/CSSElementAlign/">用CSS实现元素垂直居中方案</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/12/31/Skill/norm/normCSS/">CSS前端代码规范</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/12/31/Skill/norm/normjs/">前端代码规范Javascript</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/12/31/Skill/norm/normhtml/">HTML前端代码规范</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/12/31/Skill/norm/normdev/">前端开发代码规范</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/12/27/FrontFrame/ReactNative/Components/RNCText/">React Native Text</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/12/27/FrontFrame/ReactNative/Components/RNCTextInput/">React Native TextInput</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/12/27/FrontFrame/ReactNative/Components/RNCImage/">React Native Image</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/12/27/FrontFrame/ReactNative/Components/RNComponents/">React Native 组件</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/12/26/FrontFrame/ReactNative/RNTest/">React Native 实战封装组件</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/12/26/FrontFrame/ReactNative/RNBasics/">React Native 基础</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/12/25/FrontFrame/ReactNative/RNSetOX/">React Native IOS环境搭建</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/12/25/FrontFrame/ReactNative/RNTools/">React Native开发工具</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/12/25/FrontFrame/ReactNative/RNSetAndroid/">React Native Android环境搭建（Window）</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/12/25/FrontFrame/ReactNative/RN/">React Native初探</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/05/08/Induce/Mobile/MobileGuide/">移动Web解决方案</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/04/02/Induce/JavaScript/JSInputSearch/">Input输入框的案例</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/04/02/Plug/Gulp/InduceGulp/">Gulp前端构建工具</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/04/02/Plug/Sublime/SublimeOmniMarkupPreviewer/">OmniMarkupPreviewer</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/04/02/Induce/HTML/HtmlRem/">移动H5自适应布局</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/03/02/Demo/TextShow/">BOOS信息展示与收缩</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/02/28/Demo/MobileRotate/">移动端横屏提示动画</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/02/27/Induce/Skill/OOCSS/">面向对象的CSS样式</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/02/27/Induce/Mobile/MobliePC/">关于移动端界面在PC端显示的实现</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/02/20/Induce/Node/NodeJsWeb/">Node.js实战 建立简单的Web服务器</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/02/20/Induce/CSS/animation/">CSS3动画探秘</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/01/28/Induce/Mobile/Mobile-knowledge/">移动前端知识总结</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/01/27/Induce/Ajax/Ajax/">Ajax学习计划</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/01/20/Plug/ChromePlug/">前端Chrome插件</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/01/19/Induce/JavaScript/JSTip/">原生JS TitleTip</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/01/19/Induce/Ajax/AjaxStatus/">Ajax Status请求状态</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/01/16/Interview/FrontMap/">【转】2015-2016前端知识体系</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/01/15/Induce/JavaScript/NativeJS/">原生JavaScript探索</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/01/13/Induce/HTML/HTMLbase/">HTML结构零散</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/12/27/Hexo/GitHubHexo/">使用GitHub搭建Hexo博客</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/12/27/Hexo/HexoBug/">Hexo bug</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/12/27/Hexo/HexoPlug/">Hexo插件安装</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/12/27/Hexo/Hexo/">Hexo的使用介绍</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/12/27/Hexo/HexoTheme/">Hexo 主题：SPFK</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/12/26/Skill/win7Set/">电脑优化相关</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/12/25/Induce/CSS/CssTips/">CSS小技巧收藏</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/12/25/Interview/WebFront/">web前端职业规划</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/12/25/Induce/HTML/media/">响应式布局</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/12/25/Induce/CSS/CSS/">CSS学习计划</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/12/24/Tool/Sublime/Sublimemarkdown/">Markdown使用指南</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/12/21/Tool/Sublime/Sublimebest/">Sublime Text历练</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/12/21/Induce/JavaScript/JQueryCDN/">CDN公共库</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/12/21/Plug/Sublime/SublimePackage/">Sublime插件</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/12/21/Demohttps://tuchong.com/1496450//">前端资源导航</a></li><li class="post-list-item"><a class="post-list-link" href="/2015/12/11/Skill/BusyFront/">Busy前端工作室</a></li></ul>
    <script src="https://7.url.cn/edu/jslib/comb/require-2.1.6,jquery-1.9.1.min.js"></script>
    <script>
        $(".post-list").addClass("toc-article");
        $(".post-list-item a").attr("target","_blank");
        $("#post-nav-button > a:nth-child(2)").click(function() {
            $(".fa-bars, .fa-times").toggle();
            $(".post-list").toggle(300);
            if ($(".toc").length > 0) {
                $("#toc, #tocButton").toggle(200, function() {
                    if ($(".switch-area").is(":visible")) {
                        $("#tocButton").attr("value", valueHide);
                        }
                    })
            }
            else {
            }
        })
    </script>



    <script>
        
    </script>
</div>
      <footer id="footer">
    <div class="outer">
        <div id="footer-info">
            <div class="footer-left">
                &copy; 2017 安与生
            </div>
            <div class="footer-right">
                <a href="http://hexo.io/" target="_blank">Hexo</a>  Theme <a href="https://github.com/Jimmey-Jiang/hexo-theme-spfk" target="_blank">spfk</a> by Jimmey-Jiang
            </div>
        </div>
        
            <div class="visit">
                
                    <span id="busuanzi_container_site_pv" style='display:none'>
                        <span id="site-visit" >海贼到访数: 
                            <span id="busuanzi_value_site_uv"></span>
                        </span>
                    </span>
                
                
                    <span>, </span>
                
                
                    <span id="busuanzi_container_page_pv" style='display:none'>
                        <span id="page-visit">本页阅读量: 
                            <span id="busuanzi_value_page_pv"></span>
                        </span>
                    </span>
                
            </div>
        
    </div>
</footer>

    </div>
    <script src="https://7.url.cn/edu/jslib/comb/require-2.1.6,jquery-1.9.1.min.js"></script>
<script src="/js/main.js"></script>

    <script>
        $(document).ready(function() {
            var backgroundnum = 24;
            var backgroundimg = "url(/background/bg-x.jpg)".replace(/x/gi, Math.ceil(Math.random() * backgroundnum));
            $("#mobile-nav").css({"background-image": backgroundimg,"background-size": "cover","background-position": "center"});
            $(".left-col").css({"background-image": backgroundimg,"background-size": "cover","background-position": "center"});
        })
    </script>




	<script>
	var _hmt = _hmt || [];
	(function() {
	  var hm = document.createElement("script");
	  hm.src = "//hm.baidu.com/hm.js?819b1c6493df653afb8c7846bc4b8db6";
	  var s = document.getElementsByTagName("script")[0]; 
	  s.parentNode.insertBefore(hm, s);
	})();
	</script>


<div class="scroll" id="scroll">
    <a href="#"><i class="fa fa-arrow-up"></i></a>
    <a href="#comments"><i class="fa fa-comments-o"></i></a>
    <a href="#footer"><i class="fa fa-arrow-down"></i></a>
</div>
<script>
    $(document).ready(function() {
        if ($("#comments").length < 1) {
            $("#scroll > a:nth-child(2)").hide();
        };
    })
</script>

<script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js">
</script>

  <script language="javascript">
    $(function() {
        $("a[title]").each(function() {
            var a = $(this);
            var title = a.attr('title');
            if (title == undefined || title == "") return;
            a.data('title', title).removeAttr('title').hover(

            function() {
                var offset = a.offset();
                $("<div id=\"anchortitlecontainer\"></div>").appendTo($("body")).html(title).css({
                    top: offset.top - a.outerHeight() - 15,
                    left: offset.left + a.outerWidth()/2 + 1
                }).fadeIn(function() {
                    var pop = $(this);
                    setTimeout(function() {
                        pop.remove();
                    }, pop.text().length * 800);
                });
            }, function() {
                $("#anchortitlecontainer").remove();
            });
        });
    });
</script>


    <script type="text/javascript">
      window.onload = function(){
        document.getElementById("search").onclick = function(){
            console.log("search")
            search();
        }
      }
      function search(){
        (function(w,d,t,u,n,s,e){w['SwiftypeObject']=n;w[n]=w[n]||function(){
        (w[n].q=w[n].q||[]).push(arguments);};s=d.createElement(t);
        e=d.getElementsByTagName(t)[0];s.async=1;s.src=u;e.parentNode.insertBefore(s,e);
        })(window,document,'script','//s.swiftypecdn.com/install/v2/st.js','_st');

        _st('install','A1Pz-LKMXbrzcFg2FWi6','2.0.0');
      }
    </script>

  </div>
</body>
</html>